package pl.mpk;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.TabHost;

public class Taby extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Resources res = getResources(); // Resource object to get Drawables
		TabHost tabHost = getTabHost(); // The activity TabHost

		Intent intent = new Intent(this, Linie.class);
		tabHost.addTab(tabHost.newTabSpec("Linie")
				.setIndicator("Linie", res.getDrawable(R.drawable.ic_tab_main))
				.setContent(intent));

		Intent intent2 = new Intent(this, Przystanki.class);
		tabHost.addTab(tabHost
				.newTabSpec("Przystanki")
				.setIndicator("Przystanki", res.getDrawable(R.drawable.ic_tab_setup))
				.setContent(intent2));
		tabHost.setCurrentTab(0);
		
		Intent intent3 = new Intent(this, Polaczenia.class);
		tabHost.addTab(tabHost
				.newTabSpec("Polaczenia")
				.setIndicator("Polaczenia", res.getDrawable(R.drawable.ic_tab_setup))
				.setContent(intent3));

		// Set tabs Colors
		tabHost.setBackgroundColor(Color.BLACK);
		tabHost.getTabWidget().setBackgroundColor(Color.BLACK);
    }
}